package com.sky.mapper;

import com.sky.annotion.AutoFill;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SetmealDishMapper {

    /**
     * 根据菜品id,查询关联套餐数
     * @param dishIds
     * @return
     */
    Integer selectById(List<Long> dishIds);

    /**
     * 根据id查询套餐关联信息
     * @param dishId
     * @return
     */
    List<SetmealDish> select(Long dishId);

    /**
     * 新增与套餐关联的菜品
     * @param setmealDishes
     */

    void insert(List<SetmealDish> setmealDishes);

    /**
     * 根据id查询套餐关联的信息
     * @param setmealId
     * @return
     */
    @Select("select * from setmeal_dish where setmeal_id = #{setmealId}")
    List<SetmealDish> selectbySermealId(Long setmealId);

    /**
     * 根据id删除套餐关联菜品
     * @param setmealId
     */
    void delete(Long setmealId);
}
